home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / security / doc / clippings / 920529-02 < prev    next >
Encoding:
Internet Message Format  |  1992-06-04  |  1.9 KB

  1. From: zen@death.corp.sun.com (d)
  2. Newsgroups: alt.security,comp.security.misc
  3. Subject: mail spool dirs [Was: COPS security report question]
  4. Message-ID: <ZEN.92May29140143@death.corp.sun.com>
  5. Date: 29 May 92 19:01:43 GMT
  6. References: <root.707141979@merlin> <ZEN.92May29094208@death.corp.sun.com>
  7.     <1992May29.175751.18958@nntp.hut.fi>
  8. Organization: savage hackers
  9. In-reply-to: jkp@cs.HUT.FI's message of 29 May 92 17:57:51 GMT
  10.  
  11.  
  12. In article <1992May29.175751.18958@nntp.hut.fi> jkp@cs.HUT.FI (Jyrki Kuoppala) writes:
  13.    In article <ZEN.92May29094208@death.corp.sun.com>, zen@death (d) writes:
  14.    >  >Warning!  /usr/spool/mail is _World_ writable!
  15.    > Probably not a problem.  Esp. if a sun.
  16.    My memory is very bad as always, but I think a world-writable
  17.    /usr/spool/mail is a problem.  Though there probably was something
  18.    about SunOS that made it a less serious problem than on other machines.
  19.    Or vice versa.  Perhaps it was only about reading someone's mail by
  20.    mv'ing their mail file to your mail file.  If not, there is some
  21.    in.comsat stuff you should look at - perhaps it running as root and
  22.    making symlinks in /usr/spool/mail.
  23.  
  24.  I'll agree in principle on this one, but unfortunately if you chmod
  25. the dir, mail will often stop working.  But it can be a great way to
  26. read people's mail or worse; if they don't currently have a mail spool
  27. file, something like:
  28.  
  29. touch /usr/spool/mail/foo_user
  30. chmod 666 /usr/spool/mail/foo_user
  31.  
  32.   Will allow you to read/write mail as it comes in on almost all
  33. systems.  On the really bad ones you can do something like
  34.  
  35. echo "#!/bin/sh" > /usr/spool/mail/foo_user
  36. chmod 4777
  37. echo test | mail foo_user
  38.  
  39.   And it will will chown, but not chmod, your mail spool file.  Then
  40. the ol' suid-shell-script-symbolic-link trick gives you a suid shell
  41. of the user.  If it doesn't work, it will still often it will do
  42. assorted strange things, like not chowning the file to the rightful
  43. mail spool owner, etc.
  44.  
  45.  -- d
  46.  
  47.